package com.cloudwise.controller;

import com.cloudwise.entity.Person;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author ：Teacher陈（86521760@qq.com）
 * @date ：Created in 2021/11/18 16:32
 * @description：
 * @modified By：
 * @version:
 */
@Controller
public class PersonController {
    /**
     * @create by: Teacher陈（86521760@qq.com）
     * @description:接收实体类类型的参数
     * @create time: 2021/11/18 16:36
     * @param person
     * @return java.lang.String
     */
    @RequestMapping("/acceptParameter")
    public String acceptParameter(Person person){

        System.out.println(person.toString());
        return "hahaha";
    }
    @RequestMapping("/getJson")
    @ResponseBody
    public Person getJson(Person person){
        System.out.println(person.toString());
        return person;
    }
}
